<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象函数(方法)</title>
    <script>
        var obj=new Object();
        obj.name="飞哥";
        obj.age=18;
        obj.mathod=function() {
            console.log(obj.name);
        };
        function fun() {
            console.log(obj.name);
        }
        obj.mathod();//调方法
        fun();//调函数 
    </script>
</head>
<body>
    
</body>
</html>